1 <?php
2 session_start();
3 error_reporting(0);
4 include('includes/config.php');
5 if(strlen($_SESSION['alogin'])==0)
6 {
7 header('location:index.php');
8 }
9 else{
10 ?>
11 <!DOCTYPE HTML>
12 <html>
13 <head>
14 <title>TMS | admin manage packages</title>
15 <meta name="viewport" content="width=device-width, initial-scale=1">
16 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
17 <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
18 <!-- Bootstrap Core CSS -->
19 <link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
20 <!-- Custom CSS -->
21 <link href="css/style.css" rel='stylesheet' type='text/css' />
22 <link rel="stylesheet" href="css/morris.css" type="text/css"/>
23 <!-- Graph CSS -->
24 <link href="css/font-awesome.css" rel="stylesheet">
25 <!-- jQuery -->
26 <script src="js/jquery-2.1.4.min.js"></script>
27 <!-- //jQuery -->
28 <!-- tables -->
29 <link rel="stylesheet" type="text/css" href="css/table-style.css" />
30 <link rel="stylesheet" type="text/css" href="css/basictable.css" />
31 <script type="text/javascript" src="js/jquery.basictable.min.js"></script>
32 <script type="text/javascript">
33 $(document).ready(function() {
34 $('#table').basictable();
35
36 $('#table-breakpoint').basictable({
37 breakpoint: 768
38 });
39
40 $('#table-swap-axis').basictable({
41 swapAxis: true
42 });
43
44 $('#table-force-off').basictable({
45 forceResponsive: false
46 });
47
48 $('#table-no-resize').basictable({
49 noResize: true
50 });
51
52 $('#table-two-axis').basictable();
53
54 $('#table-max-height').basictable({
55 tableWrapper: true
56 });
57 });
58 </script>
59 <!-- //tables -->
60 <link href='//fonts.googleapis.com/css?family=Roboto:700,500,300,100italic,100,400' rel='stylesheet' type='text/css'/>
61 <link href='//fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
62 <!-- lined-icons -->
63 <link rel="stylesheet" href="css/icon-font.min.css" type='text/css' />
64 <!-- //lined-icons -->
65 </head>
66 <body>
67 <div class="page-container">
68 <!--/content-inner-->
69 <div class="left-content">
70 <div class="mother-grid-inner">
71 <!--header start here-->
72 <?php include('includes/header.php');?>
73 <div class="clearfix"> </div>
74 </div>
75 <!--heder end here-->
76 <ol class="breadcrumb">
77 <li class="breadcrumb-item"><a href="index.html">Home</a><i class="fa fa-angle-right"></i>Manage Packages</li>
78 </ol>
79 <div class="agile-grids">
80 <!-- tables -->
81
82 <div class="agile-tables">
83 <div class="w3l-table-info">
84 <h2>Manage Packages</h2>
85 <table id="table">
86 <thead>
87 <tr>
88 <th>#</th>
89 <th >Name</th>
90 <th>Type</th>
91 <th>Location</th>
92 <th>Price</th>
93 <th>Creation Date</th>
94 <th>Action</th>
95 </tr>
96 </thead>
97 <tbody>
98 <?php $sql = "SELECT * from TblTourPackages";
99 $query = $dbh -> prepare($sql);
100 //$query -> bindParam(':city', $city, PDO::PARAM_STR);
101 $query->execute();
102 $results=$query->fetchAll(PDO::FETCH_OBJ);
103 $cnt=1;
104 if($query->rowCount() > 0)
105 {
106 foreach($results as $result)
107 { ?>
108 <tr>
109 <td><?php echo htmlentities($cnt);?></td>
110 <td><?php echo htmlentities($result->PackageName);?></td>
111 <td><?php echo htmlentities($result->PackageType);?></td>
112 <td><?php echo htmlentities($result->PackageLocation);?></td>
113 <td>$<?php echo htmlentities($result->PackagePrice);?></td>
114 <td><?php echo htmlentities($result->Creationdate);?></td>
115 <td><a href="update-package.php?pid=<?php echo htmlentities($result->PackageId);?>"><button type="button" class="btn btn-primary btn-block">View Details</button></a></td>
116 </tr>
117 <?php $cnt=$cnt+1;} }?>
118 </tbody>
119 </table>
120 </div>
121 </table>
122
123
124 </div>
125 <!-- script-for sticky-nav -->
126 <script>
127 $(document).ready(function() {
128 var navoffeset=$(".header-main").offset().top;
129 $(window).scroll(function(){
130 var scrollpos=$(window).scrollTop();
131 if(scrollpos >=navoffeset){
132 $(".header-main").addClass("fixed");
133 }else{
134 $(".header-main").removeClass("fixed");
135 }
136 });
137
138 });
139 </script>
140 <!-- /script-for sticky-nav -->
141 <!--inner block start here-->
142 <div class="inner-block">
143
144 </div>
145 <!--inner block end here-->
146 <!--copy rights start here-->
147 <?php include('includes/footer.php');?>
148 <!--COPY rights end here-->
149 </div>
150 </div>
151 <!--//content-inner-->
152 <!--/sidebar-menu-->
153 <?php include('includes/sidebarmenu.php');?>
154 <div class="clearfix"></div>
155 </div>
156 <script>
157 var toggle = true;
158
159 $(".sidebar-icon").click(function() {
160 if (toggle)
161 {
162 $(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
163 $("#menu span").css({"position":"absolute"});
164 }
165 else
166 {
167 $(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
168 setTimeout(function() {
169 $("#menu span").css({"position":"relative"});
170 }, 400);
171 }
172
173 toggle = !toggle;
174 });
175 </script>
176 <!--js -->
177 <script src="js/jquery.nicescroll.js"></script>
178 <script src="js/scripts.js"></script>
179 <!-- Bootstrap Core JavaScript -->
180 <script src="js/bootstrap.min.js"></script>
181 <!-- /Bootstrap Core JavaScript -->
182
183 </body>
184 </html>
185 <?php } ?>